package ru.aptu.gsp_banking.service_impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import ru.aptu.gsp_banking.dao.TransactionDAO;
import ru.aptu.gsp_banking.domain.Transaction;
import ru.aptu.gsp_banking.service.TransactionService;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: alex
 * Date: 11/23/11
 * Time: 6:06 PM
 */

@Service
public class TransactionServiceImpl implements TransactionService {

    @Autowired
    private TransactionDAO transactionDAO;

    @Transactional
    public List<Transaction> listTransaction(Integer accountId) {
        return transactionDAO.listTransaction(accountId);
    }

    @Transactional
    public boolean checkTransaction(Integer transactionId, String name) {
        return transactionDAO.checkTransaction(transactionId, name);
    }
}
